package com.fnzn.entranceGuard.mapper;

import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.baomidou.mybatisplus.plugins.Page;
import com.fnzn.entranceGuard.bean.UnitHouseBean;
import com.fnzn.entranceGuard.entity.GuardIcInfo;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * <p>
 * IC信息管理 Mapper 接口
 * </p>
 *
 * @author JokerGao
 * @since 2018-06-25
 */
@Repository
public interface GuardIcInfoMapper extends BaseMapper<GuardIcInfo> {

    List<GuardIcInfo> selectByHouseOwnerId(Page<GuardIcInfo> page, @Param("houseOwnerId")  String houseOwnerId);

    List<GuardIcInfo> getIcInfoByDeviceId(Page<GuardIcInfo> page, @Param("deviceId")  String deviceId);

    List<GuardIcInfo> selectByIcId(String icId);

    UnitHouseBean getFloorByHouseOwnerId(String houseOwnerId);

    List<GuardIcInfo> selectByUserId(Page<GuardIcInfo> page, @Param("userId") String userId);

    List<Integer> selectCodeByUserId(@Param("userId")String userId);

    List<Integer> selectCodeByHouseOwnerId(@Param("houseOwnerId")String houseOwnerId);

    List<GuardIcInfo> selectIcByUserId(@Param("userId") String userId);

    List<GuardIcInfo> selectIcByHouseOwnerId(@Param("houseOwnerId") String houseOwnerId);

    List<GuardIcInfo> selectByHouseId(String houseId);
}
